package day1124_3;

public class A1 {
    public static void main(String[] args) {


        int[]  person={30, 40, 37, 36};
        int[]  person2=new   int[4];
        System.out.println( person[2]  );//37
        System.out.println( person2[3] );//0
        double[]  ds=new double[4];//0.0
        System.out.println(ds[3]);//0.0

        //整boolean数组类型  //放入10个false
        boolean[]       bs=new boolean[10];
        System.out.println(  bs[0]  );//false






        String[]    ns=new String[5];
        //不属于基本数据类型的变量默认值都是null
        System.out.println( ns[3] );//null

        byte[]   fs={3, 5, 20};   //fs.length:获取fs的长度
        System.out.println(  fs.length );
        System.out.println(  fs[  fs.length-1 ]  );

        char[]  chs={'张' ,  '李' , '王'  , '赵'};
        //循环获取数组的每个元素
        //               数组长度-1
        for(int i=0;  i<=chs.length-1  ;i++){
            System.out.println( chs[i] );
            //                  取出数组第i个元素
        }





    }
}
